﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Infrastructure.WpfClient.Accessibility
{
    public partial class AccessibilityDataCacheSyncAgent : Microsoft.Synchronization.SyncAgent 
    {
        private Microsoft.Synchronization.Data.SyncGroup _globalSyncGroup;
        private AccessibilitySyncTable _accssebilitySyncTable;
        partial void OnInitialized();
        public AccessibilityDataCacheSyncAgent()
        {        
            this.InitializeSyncTables();
            this.OnInitialized();
        }
        public AccessibilitySyncTable Accssebility
        {
            get
            {
                return this._accssebilitySyncTable;
            }
            set
            {
                this.Configuration.SyncTables.Remove(this._accssebilitySyncTable);
                this._accssebilitySyncTable = value;
                this.Configuration.SyncTables.Add(this._accssebilitySyncTable);
            }
        }
        
        private void InitializeSyncTables()
        {
            // Create a global SyncGroup.
            this._globalSyncGroup = new Microsoft.Synchronization.Data.SyncGroup("LocalDataCache1GlobalSyncGroup");
            // Create SyncTables.
            this._accssebilitySyncTable = new  AccessibilitySyncTable();
            this._accssebilitySyncTable.SyncGroup = _globalSyncGroup;
            this.Configuration.SyncTables.Add(this._accssebilitySyncTable);
        }


    }
}
